#include <stdio.h>

#define N_MAX 7000

typedef unsigned char bool_t;

bool_t
lookup_elem_slow(int what, int* where, int n)
{
	register short i;

	for (i = 0; i < n; ++i) {
		if (where[i] == what)
			return true;
	}
	return false;
}


bool_t
lookup_elem_binsearch(int what, int* where, int n)
{
	int L = 0,
	    R = n - 1,
	    M;

	while (L < R) {
		M = (L + R) / 2;
		if (where[M] < what)
			L = M + 1;
		else
			R = M;
	}
	if (where[L] == what && n != 0)
		return true;
	else
		return false;
}


int
insert_get_index(int what, int* where, int n)
{
	int L = 0, R = n - 1, M;

	while (L < R) {
		M = (L + R) / 2;
		if (what > where[M])
			L = M+1;
		else
			R = M;
	}
	if (where[R] > what) {
		return L;
	} else {
		if (L < n-1) {
			insert_get_index(what+1, where, n);
		} else {
			return n;
		}
	}
}


void
insert_ins(int what, int ind, int* array, int n)
{
	register int i;
	for (i = n; i > ind; --i) {
		array[i] = array[i-1];
	}
	array[ind] = what;
}


int
main(void)
{
	int array[N_MAX], n, i = 0, tmp, j = 0;
	register int result = 0;

	freopen("unique.in", "rt", stdin);
	freopen("unique.out", "w", stdout);

	scanf("%d\n", &n);
	while (i++ < n) {
		(void) scanf("%d", &tmp);
		++result;
		if (!lookup_elem_binsearch(tmp, array, j)) {
			insert_ins(tmp, insert_get_index(tmp, array, j), array, j);
			++j;
		} else {
			--result; /* counter-increment */
		}
	}
	printf("%d\n", result);
	return 0;
}
